package com.freecat.xmqgct.mvp.ui.holder;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.freecat.xmqgct.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 作者：win
 * 时间：2019/8/23
 * 注释：
 */
public class VideoHolder {
    Context context;
    @BindView(R.id.iv_photo)
    public ImageView ivPhoto;
    @BindView(R.id.iv_delete)
    public ImageView ivDelete;

    public VideoHolder(View view) {
        context = view.getContext();
        ButterKnife.bind(this, view);
    }

    public void setModel(String id) {
        String url = id;
        try {
//            Bitmap netVideoBitmap = Tools.getNetVideoBitmap(url);
//            if (netVideoBitmap == null) {
                ivPhoto.setImageResource(R.drawable.icon_video);
//            } else {
//                ivPhoto.setImageBitmap(netVideoBitmap);
//            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
